package com.xyz;

import java.util.ArrayList;
import java.util.List;

public class Service {
	private List <Basket> baskets=new ArrayList <Basket>();

	public Service() {
		
		List<Disc> ld=new ArrayList<Disc>();		
		
		/*for (int i=1; i<=10; i++) {	
			String title="film"+i;
			int year=2000+i;
			List <String> genres=new ArrayList<String>();
			genres.add("genre"+i);
			genres.add("genre"+(i+1));
			
			ld.add(new Disc(new Film(title, year, genres), DiskType.DVD));
		}*/
		
		Basket b=new Basket(ld, "0678570800", "volodymyrprfromukraine@gmail.com", new User());
		baskets.add(b);
	}
	
	public List<Basket> getBaskets() {
		return baskets;
	}
	
	public void addBasket(Basket newBasket) {
		this.baskets.add(newBasket);
	}

	public void addToBasket(Disc newDisc) {
		this.baskets.get(this.baskets.size()-1).addDisc(newDisc);
	}
}
